<?php

$this->widget('bootstrap.widgets.BootGridView', array(
        'id'=>'flatcategory-grid',
        'summaryText'=>'',
        'dataProvider'=>$flatCategory->search(),
        'emptyText'=>'Nincsen lakás kategória',
        'columns'=>array(
                array(
                        'name'=>'name',
                        'filter'=>CHtml::activeTextField($flatCategory, 'name'),
                        'value'=>'$data->name',
                ),
                array(
                        'name'=>'low',
                        'type'=>'raw',
                        'value'=>'isset($data->low) ? $data->low ." m&sup2;" : ""',
                        'htmlOptions'=>array('style'=>'width: 100px; text-align: right;')
                ),
                array(
                        'name'=>'high',
                        'type'=>'raw',
                        'value'=>'isset($data->high) ? $data->high ." m&sup2;" : ""',
                        'htmlOptions'=>array('style'=>'width: 100px; text-align: right;')
                ),
                array(
                        'class'=>'bootstrap.widgets.BootButtonColumn',
                        'template' => '{update} {delete}',
                        'buttons' => array(
                                'update' => array(
                                        'visible'=>'checkAccess("FlatCategory.Update")',
                                        'url'=>'createUrl("flatcategory/update", array("id"=>$data->id))',
                                        'label'=> 'Szerkeszt',
                                        'options'=>array(
                                                'class'=>'btn update btn-info'
                                        )
                                ),
                                'delete' => array(
                                        'visible'=>'checkAccess("FlatCategory.Delete")',
                                        'url'=>'createUrl("flatcategory/delete", array("id"=>$data->id))',
                                        'label'=> 'Töröl',
                                        'options'=>array(
                                                'class'=>'btn delete btn-inverse'
                                        )
                                ),
                        ),
                        'htmlOptions'=>array('style'=>'width: 110px'),
                )

        )
));

     echo "<hr />";
    echo CHtml::link('Új lakáskategória', array('flatcategory/create', 'blockId'=>$model->id), array('class'=>'btn btn-primary'));
